Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instance tags to ec2_metadata_facts return values #2398

Conversation

hakbailey
Copy link
Contributor

SUMMARY

Fixes #2293

A list of instance tag keys was added to the return values in version 5.5.0. This adds a new return value that includes the full key:value pairs for the instance tags.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

ec2_metadata_facts

Copy link

github-actions bot commented Nov 20, 2024

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/a09c8a9a9cd942a1b061b05e6283782b

✔️ ansible-galaxy-importer SUCCESS in 4m 05s
✔️ build-ansible-collection SUCCESS in 10m 07s
✔️ ansible-test-splitter SUCCESS in 3m 50s
✔️ integration-amazon.aws-1 SUCCESS in 16m 44s
Skipped 43 jobs

@hakbailey hakbailey requested a review from tremble November 21, 2024 16:31
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/1468314924694d80911de87b9a484874

✔️ ansible-galaxy-importer SUCCESS in 4m 53s
✔️ build-ansible-collection SUCCESS in 10m 26s
✔️ ansible-test-splitter SUCCESS in 3m 53s
✔️ integration-amazon.aws-1 SUCCESS in 10m 06s
Skipped 43 jobs

Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/3aac76693c2a449989976fbcb8ccdb49

✔️ ansible-galaxy-importer SUCCESS in 5m 57s
✔️ build-ansible-collection SUCCESS in 10m 22s
✔️ ansible-test-splitter SUCCESS in 3m 55s
integration-amazon.aws-1 FAILURE in 14m 37s
Skipped 43 jobs

Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/03cfe03843cd4a4188a224edecbe8cec

✔️ ansible-galaxy-importer SUCCESS in 5m 35s
✔️ build-ansible-collection SUCCESS in 10m 46s
✔️ ansible-test-splitter SUCCESS in 3m 56s
integration-amazon.aws-1 FAILURE in 18m 12s
Skipped 43 jobs

@hakbailey
Copy link
Contributor Author

recheck

Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/84c6a51b949d4ce0abafc852e77b797b

✔️ ansible-galaxy-importer SUCCESS in 3m 37s
✔️ build-ansible-collection SUCCESS in 10m 43s
✔️ ansible-test-splitter SUCCESS in 3m 57s
integration-amazon.aws-1 FAILURE in 13m 48s
Skipped 43 jobs

Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/33491fce0ada4f78960632c2f05d8874

✔️ ansible-galaxy-importer SUCCESS in 5m 10s
✔️ build-ansible-collection SUCCESS in 10m 21s
✔️ ansible-test-splitter SUCCESS in 3m 50s
integration-amazon.aws-1 FAILURE in 14m 54s
Skipped 43 jobs

@alinabuzachis
Copy link
Collaborator

recheck

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/c352fc3a44ab422db0f46e2e85b1d1e9

✔️ ansible-galaxy-importer SUCCESS in 9m 19s
✔️ build-ansible-collection SUCCESS in 10m 57s
✔️ ansible-test-splitter SUCCESS in 4m 14s
✔️ integration-amazon.aws-1 SUCCESS in 10m 32s
Skipped 43 jobs

@alinabuzachis alinabuzachis added the mergeit Merge the PR (SoftwareFactory) label Dec 3, 2024
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Dec 3, 2024
SUMMARY
With OpenSSH 9.5 the default format for SSH key generation was switched over to ed25519 (a good thing).  However, some older OSes don't support ed25519 (eg the older image we use for testing ec2_metadata_facts python 2 compatibility).
setup_sshkey now:

Explicitly generates an 4096 bit RSA key (key_material)
Generates the somewhat quirky md5sum based fingerprint AWS uses for RSA keys (fingerprint)
Explicitly generates an ed25519 key (another_key_material)
Pads the standard sha256 fingerprint to match the, technically correct, AWS format (another_fingerprint)

ec2_key test now also checks the fingerprint of the second imported key.
(Also fixes the issue seen in #2398 by switching ssh key generation back to the old 4096 bit RSA for key_material)
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
tests/integration/targets/setup_sshkey
tests/integration/targets/ec2_key
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis
patchback bot pushed a commit that referenced this pull request Dec 3, 2024
SUMMARY
With OpenSSH 9.5 the default format for SSH key generation was switched over to ed25519 (a good thing).  However, some older OSes don't support ed25519 (eg the older image we use for testing ec2_metadata_facts python 2 compatibility).
setup_sshkey now:

Explicitly generates an 4096 bit RSA key (key_material)
Generates the somewhat quirky md5sum based fingerprint AWS uses for RSA keys (fingerprint)
Explicitly generates an ed25519 key (another_key_material)
Pads the standard sha256 fingerprint to match the, technically correct, AWS format (another_fingerprint)

ec2_key test now also checks the fingerprint of the second imported key.
(Also fixes the issue seen in #2398 by switching ssh key generation back to the old 4096 bit RSA for key_material)
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
tests/integration/targets/setup_sshkey
tests/integration/targets/ec2_key
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis
(cherry picked from commit 5a9d6aa)
Copy link
Contributor

Build succeeded (gate pipeline).
https://ansible.softwarefactory-project.io/zuul/buildset/98557455338b4888a656b162427c76ea

✔️ ansible-galaxy-importer SUCCESS in 4m 27s
✔️ build-ansible-collection SUCCESS in 10m 25s
✔️ ansible-test-splitter SUCCESS in 4m 06s
✔️ integration-amazon.aws-1 SUCCESS in 9m 47s
Skipped 43 jobs

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 43387ec into ansible-collections:main Dec 3, 2024
45 checks passed
Copy link

patchback bot commented Dec 3, 2024

Backport to stable-9: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-9/43387ec3d88550bc09748fd2a180cc77d2fac659/pr-2398

Backported as #2408

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Dec 3, 2024
SUMMARY
Fixes #2293
A list of instance tag keys was added to the return values in version 5.5.0. This adds a new return value that includes the full key:value pairs for the instance tags.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
ec2_metadata_facts

Reviewed-by: Mark Chappell
Reviewed-by: Helen Bailey <[email protected]>
Reviewed-by: Alina Buzachis
Reviewed-by: Bikouo Aubin
(cherry picked from commit 43387ec)
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Dec 3, 2024
…2407)

This is a backport of PR #2406 as merged into main (5a9d6aa).
SUMMARY
With OpenSSH 9.5 the default format for SSH key generation was switched over to ed25519 (a good thing).  However, some older OSes don't support ed25519 (eg the older image we use for testing ec2_metadata_facts python 2 compatibility).
setup_sshkey now:

Explicitly generates an 4096 bit RSA key (key_material)
Generates the somewhat quirky md5sum based fingerprint AWS uses for RSA keys (fingerprint)
Explicitly generates an ed25519 key (another_key_material)
Pads the standard sha256 fingerprint to match the, technically correct, AWS format (another_fingerprint)

ec2_key test now also checks the fingerprint of the second imported key.
(Also fixes the issue seen in #2398 by switching ssh key generation back to the old 4096 bit RSA for key_material)
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
tests/integration/targets/setup_sshkey
tests/integration/targets/ec2_key
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Dec 3, 2024
This is a backport of PR #2398 as merged into main (43387ec).
SUMMARY
Fixes #2293
A list of instance tag keys was added to the return values in version 5.5.0. This adds a new return value that includes the full key:value pairs for the instance tags.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
ec2_metadata_facts

Reviewed-by: Alina Buzachis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-9 mergeit Merge the PR (SoftwareFactory)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ec2_metadata_facts: Add support to query instance tags + values
4 participants